package com.server.pinggu.service.impl;

import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.commons.lang3.StringUtils;
import com.server.pinggu.mapper.SenFormfieldsoldMapper;
import com.server.pinggu.domain.SenFormfieldsold;
import com.server.pinggu.service.ISenFormfieldsoldService;

import java.util.List;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ltao
 * @date 2022-10-23
 */
@Service
public class SenFormfieldsoldServiceImpl extends ServiceImpl<SenFormfieldsoldMapper, SenFormfieldsold> implements ISenFormfieldsoldService {

    @Override
    public List<SenFormfieldsold> queryList(SenFormfieldsold senFormfieldsold) {
        LambdaQueryWrapper<SenFormfieldsold> lqw = Wrappers.lambdaQuery();
        if (senFormfieldsold.getPid() != null){
            lqw.eq(SenFormfieldsold::getPid ,senFormfieldsold.getPid());
        }
        if (StringUtils.isNotBlank(senFormfieldsold.getTitle())){
            lqw.eq(SenFormfieldsold::getTitle ,senFormfieldsold.getTitle());
        }
        if (senFormfieldsold.getFtype() != null){
            lqw.eq(SenFormfieldsold::getFtype ,senFormfieldsold.getFtype());
        }
        if (StringUtils.isNotBlank(senFormfieldsold.getSets())){
            lqw.eq(SenFormfieldsold::getSets ,senFormfieldsold.getSets());
        }
        if (senFormfieldsold.getOrdering() != null){
            lqw.eq(SenFormfieldsold::getOrdering ,senFormfieldsold.getOrdering());
        }
        if (senFormfieldsold.getClas() != null){
            lqw.eq(SenFormfieldsold::getClas ,senFormfieldsold.getClas());
        }
        if (StringUtils.isNotBlank(senFormfieldsold.getCode())){
            lqw.eq(SenFormfieldsold::getCode ,senFormfieldsold.getCode());
        }
        if (StringUtils.isNotBlank(senFormfieldsold.getDepOn())){
            lqw.eq(SenFormfieldsold::getDepOn ,senFormfieldsold.getDepOn());
        }
        if (StringUtils.isNotBlank(senFormfieldsold.getInfo())){
            lqw.eq(SenFormfieldsold::getInfo ,senFormfieldsold.getInfo());
        }
        if (senFormfieldsold.getComb() != null){
            lqw.eq(SenFormfieldsold::getComb ,senFormfieldsold.getComb());
        }
        return this.list(lqw);
    }
}